<%@page import="util.MysqlConnect"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.Connection"%>
<%@ page import="java.sql.ResultSet"%>
<%@ page import="java.sql.DriverManager"%>
<%@ page import="java.sql.Statement"%>
<%@ page import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<%
		Connection connection = null;
		Statement statement = null;
		ResultSet rs = null;
		boolean exists = false;
		MysqlConnect dbConnectObject = new MysqlConnect();
		
		connection = dbConnectObject.dbConnect();
		statement = connection.createStatement();
		String id = request.getParameter("id");
		statement.executeUpdate("DELETE FROM cse6324_sestudents WHERE StudentId ='"+id+"'"); 
		statement.executeUpdate("DELETE FROM cse6324_studentlogin WHERE Id ='"+id+"'"); 
    	String redirectURL = "homeAdmin.jsp?success=0";
 		 response.sendRedirect(redirectURL);
        statement.close();
        dbConnectObject.dbConnectionsClose();

		
 %>
</body>
</html>